<?php

	session_start();
	require_once("../db_connect.php");

	//職業登録

	$position_name  = htmlspecialchars($_POST['position_name'],ENT_QUOTES,"UTF-8");

	$sql = "INSERT INTO position (position_name) VALUES (?)";

	$stmt = $db->prepare($sql);

    $data = array($position_name);

	$db->execute($stmt, $data);     //UPDATE文を実行

	if (PEAR::isError($db)) {       //SQLの実行に失敗すればここでエラー文を出力
    	die($res->getMessage());
	}

	header("Location: manage_position.php");
?>